int removeDuplicates(int* nums, int numsSize) {
    int xm=0;
    int sm=1;
    while(sm<numsSize)
    {
        if(nums[sm]!=nums[xm])
        {
            nums[++xm]=nums[sm++];
        }
        else sm++;
    }
    return xm+1;
}
